-- GENERATED SPELL FOR [Disobedient Dragonmaw Peon] --


function spell0_23311(pUnit, Event) --@Dazed and Confused,Self--
pUnit:FullCastSpellOnTarget(40714,pUnit)
pUnit:RegisterEvent('Sorts_23311', 588, 1)
end

function spell1_23311(pUnit, Event) --@Defiant and Enraged,Self--
pUnit:FullCastSpellOnTarget(40735,pUnit)
pUnit:RegisterEvent('Sorts_23311', 586, 1)
end

function spell2_23311(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(34802,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23311', 6325, 1)
end

function spell3_23311(pUnit, Event) --@Lazy and Good for Nothing,Self--
pUnit:FullCastSpellOnTarget(40732,pUnit)
pUnit:RegisterEvent('Sorts_23311', 689, 1)
end

function spell4_23311(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(15572,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23311', 30251, 1)
end

function Sorts_23311(pUnit, Event)
local choix_sorts_23311 = math.random(0, 4)
if choix_sorts_23311 == 0 then
pUnit:RegisterEvent('spell0_23311', 1, 1)
end
if choix_sorts_23311 == 1 then
pUnit:RegisterEvent('spell1_23311', 1, 1)
end
if choix_sorts_23311 == 2 then
pUnit:RegisterEvent('spell2_23311', 1, 1)
end
if choix_sorts_23311 == 3 then
pUnit:RegisterEvent('spell3_23311', 1, 1)
end
if choix_sorts_23311 == 4 then
pUnit:RegisterEvent('spell4_23311', 1, 1)
end
end

function mob23311_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23311', math.random(1500, 3000), 1)
end

function mob23311_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23311_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23311_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23311, 1, 'mob23311_Action')
RegisterUnitEvent(23311, 2, 'mob23311_Leave')
RegisterUnitEvent(23311, 3, 'mob23311_Kill')
RegisterUnitEvent(23311, 4, 'mob23311_Die')
